import Layout from '@/layout/index.vue'
import { createNameComponent } from '../createNode'
const route = [
  {
    path: '/pages',
    component: Layout,
    redirect: 'pages/crudTable',
    meta: { title: '系统管理', icon: 'el-icon-menu' },
    children: [
      // {
      //   path: 'crudTable',
      //   component: createNameComponent(() => import('@/views/main/pages/crudTable/index.vue')),
      //   meta: { title: '业务表格', cache: false }
      // },
      // {
      //   path: 'categoryTable',
      //   component: createNameComponent(() => import('@/views/main/pages/categoryTable/index.vue')),
      //   meta: { title: '分类联动表格', cache: true }
      // },
      // {
      //   path: 'treeTable',
      //   component: createNameComponent(() => import('@/views/main/pages/treeTable/index.vue')),
      //   meta: { title: '树联动表格', cache: true }
      // },
      {
        path: 'dictType',
        component: () => import('@/views/main/pages/dict/dictType/index.vue'),
        meta: { title: '数据字典', icon: 'el-icon-notebook-1', cache: true }
      },
      {
        path: 'dictValue',
        component: () => import('@/views/main/pages/dict/dictValue/index.vue'),
        meta: { title: '字典数据', cache: true },
        hideMenu: true
      },
      {
        path: 'post',
        component: createNameComponent(() => import('@/views/main/pages/post/index.vue')),
        meta: { title: '岗位管理', icon: 'el-icon-help', cache: true }
      },
      {
        path: 'dept',
        component: createNameComponent(() => import('@/views/main/pages/dept/index.vue')),
        meta: { title: "部门管理", icon: 'el-icon-collection', cache: true }
      },
      {
        path: 'menu',
        component: createNameComponent(() => import('@/views/main/pages/menu/index.vue')),
        meta: { title: '菜单管理', icon: 'el-icon-s-grid', cache: true }
      },
      {
        path: 'role',
        component: createNameComponent(() => import('@/views/main/pages/role/index.vue')),
        meta: { title: '角色管理', icon: 'el-icon-s-management', cache: true }
      },
      {
        path: "ruser",
        component: createNameComponent(() => import('@/views/main/pages/role/roleUser.vue')),
        meta: { title: "分配用户", cache: true },
        hideMenu: true
      },
      {
        path: 'user',
        component: createNameComponent(() => import('@/views/main/pages/user/index.vue')),
        meta: { title: '用户管理', icon: 'el-icon-s-custom', cache: true }
      },
    ]
  }
]

export default route